import {request} from "umi"
export let gettags = (params: any) => {
    return request("https://api.blog.wipi.tech/api/category",params)
}
export let getswiper=()=>{
    return request("https://api.blog.wipi.tech/api/article/all/recommend")
}

export let getArticlelist=()=>{
    return request("https://api.blog.wipi.tech/api/article")
}
export let getlabel=()=>{
    return request("https://api.blog.wipi.tech/api/tag")
}

// 详情
export let getArticleDetail=(id: any)=>{
    return request(`https://api.blog.wipi.tech/api/article/${id}/views`,{
        method:'POST',
    })
}
//详情右边请求
export let deatilread =(id:string)=>{
    return request(`https://api.blog.wipi.tech/api/article/recommend?articleId=${id}`)
}
//喜欢
export let changelikes=(id:string,params:object)=>{
    return request(`api/article/${id}/likes`,{
        method:"POST",
        data:params
    })
}